Skip to content

Conversation

@sacOO7
Copy link
Collaborator

@sacOO7 sacOO7 commented Jul 21, 2025

Fixed #1123

Summary by CodeRabbit

  • New Features

    • Introduced real-time subscription and notification capabilities for LiveMap and LiveCounter objects, allowing users to receive updates when values or entries change.
    • Added explicit update event types for LiveMap (UPDATED, REMOVED) and LiveCounter (increment/decrement amounts).
    • Provided methods to subscribe, unsubscribe, and manage listeners for live object updates.
  • Bug Fixes

    • Improved handling of no-op updates and tombstoned objects for more accurate event propagation.
  • Tests

    • Added integration tests verifying subscription, update delivery, and unsubscription for LiveMap and LiveCounter objects.
    • Updated unit tests to validate new update event structures and types.
  • Documentation

    • Enhanced in-code documentation and comments, including specification references and detailed KDoc for helper functions.
  • Refactor

    • Refined update handling from generic maps to strongly-typed update objects for better clarity and consistency.
    • Modularized and documented fixture and helper code for improved maintainability.
  • Style

    • Improved code formatting and import organization for readability.

@coderabbitai
Copy link

coderabbitai bot commented Jul 21, 2025

Warning

Rate limit exceeded

@sacOO7 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 14 minutes and 30 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between ae81bbc and 86c08f6.

📒 Files selected for processing (2)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1 hunks)

Walkthrough

This change introduces a comprehensive data subscription mechanism for live objects, particularly LiveMap and LiveCounter, across Java and Kotlin codebases. It adds new update abstractions, subscription interfaces, event coordinators, and modifies object state handling to use strongly-typed update classes. Integration and unit tests are updated and extended to verify the new subscription and notification flows.

Changes

Cohort / File(s) Change Summary
Java API: Subscription & Update Abstractions
lib/src/main/java/io/ably/lib/objects/type/LiveObjectUpdate.java, lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterChange.java, lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java, lib/src/main/java/io/ably/lib/objects/type/map/LiveMapChange.java, lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java, lib/src/main/java/io/ably/lib/objects/ObjectsSubscription.java
Introduces update abstraction (LiveObjectUpdate), strongly-typed update classes (LiveCounterUpdate, LiveMapUpdate), and subscription interfaces (LiveCounterChange, LiveMapChange). Adds specification comments to ObjectsSubscription.
Java API: Type & Interface Relocation
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounter.java, lib/src/main/java/io/ably/lib/objects/type/map/LiveMap.java, lib/src/main/java/io/ably/lib/objects/LiveObjects.java
Moves LiveCounter and LiveMap interfaces to type-specific packages and updates them to extend their respective change interfaces. Adds relevant imports.
Kotlin Core: Base Object and Manager Refactor
live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt, live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsManager.kt, live-objects/src/main/kotlin/io/ably/lib/objects/DefaultLiveObjects.kt, live-objects/src/main/kotlin/io/ably/lib/objects/Helpers.kt, live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsPool.kt
Refactors base object methods to use LiveObjectUpdate instead of generic maps, enforces typed notification, and adds spec comments. Refines internal update handling and imports.
Kotlin: LiveCounter Implementation
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt, live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt, live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt
Adds subscription management and notification for LiveCounter. Refactors state and operation methods to use LiveCounterUpdate. Implements event coordination and emission for counter updates.
Kotlin: LiveMap Implementation
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt, live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt, live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt
Adds subscription management and notification for LiveMap. Refactors state and operation methods to use LiveMapUpdate. Implements event coordination and emission for map updates.
Integration Tests: Subscription Coverage
live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveCounterTest.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveObjectsTest.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt
Adds new integration tests for live counter and map subscriptions, updates imports, and increases test timeout.
Test Helpers & Fixtures
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/Utils.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt, live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt
Refactors map/counter fixture creation into helper functions with documentation. Updates imports and data creation logic.
Unit Tests: Update Type Adaptation
live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livecounter/LiveCounterManagerTest.kt, live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt
Updates assertions and test logic to expect new strongly-typed update objects and enums.

Sequence Diagram(s)

sequenceDiagram
    participant Client
    participant LiveMap/LiveCounter
    participant Manager/Coordinator
    participant Listener

    Client->>LiveMap/LiveCounter: subscribe(listener)
    LiveMap/LiveCounter->>Manager/Coordinator: register listener
    Manager/Coordinator-->>Client: ObjectsSubscription

    Note over LiveMap/LiveCounter,Manager/Coordinator: State change occurs (e.g., set, inc)
    LiveMap/LiveCounter->>Manager/Coordinator: notifyUpdated(LiveObjectUpdate)
    Manager/Coordinator->>Listener: onUpdated(LiveMapUpdate/LiveCounterUpdate)

    Client->>LiveMap/LiveCounter: unsubscribe(listener)
    LiveMap/LiveCounter->>Manager/Coordinator: remove listener
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Assessment against linked issues

Objective Addressed Explanation
Implement BaseLiveObject#data-subscriptions for LiveMap and LiveCounter, including subscription APIs, update notification, and listener management (#1123, ECO-5458)
Use strongly-typed update abstractions and event-driven notification for live object changes (#1123, ECO-5458)
Add and update integration/unit tests to verify subscription and notification flows (#1123, ECO-5458)

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Refactoring fixture creation to helper functions with documentation (live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt, MapFixtures.kt) While helpful for test clarity, modularizing fixture creation is not strictly required for implementing data subscriptions.
Increasing test timeout (live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt) Raising the integration test timeout is not directly related to the core subscription feature objectives.

Possibly related PRs

  • Setup : LiveObject plugin #1085: Introduces foundational LiveObjects plugin interfaces and integration, which are extended and built upon in this PR for subscription and update mechanisms.

Suggested reviewers

  • ttypic

Poem

In the warren where updates hop and leap,
LiveMaps and Counters now secrets keep.
Subscriptions bloom, listeners awake,
Notified with every change we make.
Typed updates bound with carrot string—
Oh, what joy these new features bring!
🥕✨

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/object-subscriptions

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 21, 2025 12:12 Inactive
@sacOO7 sacOO7 force-pushed the feature/object-subscriptions branch from 90b7cf5 to 819ec3d Compare July 21, 2025 12:13
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 21, 2025 12:14 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 21, 2025 12:15 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 22, 2025 12:03 Inactive
@sacOO7 sacOO7 force-pushed the feature/object-subscriptions branch from aafa1a1 to a051c2d Compare July 22, 2025 12:05
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 22, 2025 12:06 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 22, 2025 12:07 Inactive
…rit LiveObjectUpdate

1. Updated mapManager to return LiveMapUpdate instead of Map
2. Updated counterManager to return LiveCounterUpdate instead of map
3. Updated BaseLiveObject accordingly
@sacOO7 sacOO7 force-pushed the feature/object-subscriptions branch from a051c2d to abdf445 Compare July 22, 2025 13:05
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 22, 2025 13:06 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 22, 2025 13:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 22, 2025 14:55 Inactive
- Added toString methods to pretty print update
@sacOO7 sacOO7 force-pushed the feature/object-subscriptions branch from 1197fe0 to 9989a1e Compare July 22, 2025 15:06
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 22, 2025 15:07 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 22, 2025 15:09 Inactive
# Conflicts:
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt
#	live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 23, 2025 10:13 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 23, 2025 10:15 Inactive
@sacOO7 sacOO7 marked this pull request as ready for review July 23, 2025 11:40
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 23, 2025 11:41 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 23, 2025 11:43 Inactive
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

♻️ Duplicate comments (1)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)

43-49: Avoid force unwrapping in listener callback.

Same issue as in LiveMapChangeCoordinator - the force unwrap operation event!! could cause a NullPointerException.

   override fun apply(listener: LiveCounterChange.Listener?, event: LiveCounterUpdate?, vararg args: Any?) {
     try {
-      listener?.onUpdated(event!!)
+      event?.let { listener?.onUpdated(it) }
+        ?: Log.w(tag, "Null event passed to listener callback")
     } catch (t: Throwable) {
       Log.e(tag, "Error occurred while executing listener callback for event: $event", t)
     }
   }
🧹 Nitpick comments (4)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)

59-79: Consider design consistency with LiveMapUpdate's enum approach.

The nested Update class stores a single Double amount, while LiveMapUpdate uses an enum for change types. For a simple value like Double, this might be over-engineered compared to storing the Double directly in the parent class.

Consider simplifying by storing the Double directly:

public LiveCounterUpdate(@NotNull Double amount) {
-    super(new Update(amount));
+    super(amount);
}

@NotNull
public Double getUpdate() {
-    return (Update) update;
+    return (Double) update;
}

This would eliminate the nested class and align better with the simpler data structure needed for counter updates.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (1)

303-306: Improve unsubscription verification logic.

The current approach of waiting for the map size to change doesn't guarantee that enough time has passed to verify that no subscription callbacks were triggered. Consider adding an explicit delay to ensure the callback would have been invoked if the subscription was still active.

     // Wait for a moment to ensure no updates are received
     assertWaiter { userProfile.size() == 4L }
+    // Add explicit delay to ensure callbacks would have been processed
+    delay(500)
 
     assertTrue(userProfileUpdates.isEmpty(), "No updates should be received after unsubscribing")
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt (1)

36-36: Consider handling edge cases in counter subtraction.

When calculating the update amount, if the counter was reset or had unexpected changes, the subtraction might not accurately reflect the actual change. Consider adding validation or logging for unusual cases.

-    return LiveCounterUpdate(liveCounter.data.get() - previousData)
+    val changeAmount = liveCounter.data.get() - previousData
+    if (kotlin.math.abs(changeAmount) > 1e9) {
+      Log.w(tag, "Unusually large counter change detected: $changeAmount for objectId=$objectId")
+    }
+    return LiveCounterUpdate(changeAmount)
live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt (1)

56-62: Consider using when expression for better readability.

The if-else chain could be replaced with a when expression for better readability and compile-time exhaustiveness checking.

     if (isTombstoned) {
       // this object is tombstoned. this is a terminal state which can't be overridden. skip the rest of object state message processing
-      if (objectType == ObjectType.Map) {
-        return noOpMapUpdate
-      }
-      return noOpCounterUpdate
+      return when (objectType) {
+        ObjectType.Map -> noOpMapUpdate
+        ObjectType.Counter -> noOpCounterUpdate
+      }
     }
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 6d7f0fe and 1847ba8.

📒 Files selected for processing (28)
  • lib/src/main/java/io/ably/lib/objects/LiveObjects.java (1 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/LiveObjectUpdate.java (1 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounter.java (2 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterChange.java (1 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/map/LiveMap.java (2 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/map/LiveMapChange.java (1 hunks)
  • lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (1 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/DefaultLiveObjects.kt (3 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsManager.kt (3 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt (7 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (2 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt (6 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt (2 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1 hunks)
  • live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (14 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveCounterTest.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveObjectsTest.kt (1 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/Utils.kt (1 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (1 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/unit/ObjectMessageSizeTest.kt (0 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livecounter/LiveCounterManagerTest.kt (2 hunks)
  • live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt (12 hunks)
🧠 Learnings (25)
📓 Common learnings
Learnt from: sacOO7
PR: ably/ably-java#1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.
Learnt from: sacOO7
PR: ably/ably-java#1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:48-61
Timestamp: 2025-06-03T09:15:18.827Z
Learning: User sacOO7 prefers simple test utilities without extensive error handling, believing tests should fail fast if incorrect field/method names are used rather than having defensive programming.
lib/src/main/java/io/ably/lib/objects/LiveObjects.java (7)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/Utils.kt (7)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livecounter/LiveCounterManagerTest.kt (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMap.java (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounter.java (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (1)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

lib/src/main/java/io/ably/lib/objects/type/LiveObjectUpdate.java (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/DefaultLiveObjects.kt (8)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsManager.kt (5)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterChange.java (2)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveCounterTest.kt (3)

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-10-08T15:37:26.765Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-09-25T09:08:30.472Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMapChange.java (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (4)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveObjectsTest.kt (6)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-10-08T15:37:26.765Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-09-25T09:08:30.472Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:48-61
Timestamp: 2025-06-03T09:15:18.827Z
Learning: User sacOO7 prefers simple test utilities without extensive error handling, believing tests should fail fast if incorrect field/method names are used rather than having defensive programming.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

🧬 Code Graph Analysis (9)
lib/src/main/java/io/ably/lib/objects/LiveObjects.java (1)
live-objects/src/main/kotlin/io/ably/lib/objects/ObjectId.kt (1)
  • type (5-62)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt (1)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (2)
  • createMap (22-26)
  • createCounter (57-61)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt (1)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (2)
  • setMapRef (40-43)
  • createMap (22-26)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1)
lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (1)
  • LiveMapUpdate (14-66)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (2)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (2)
  • generateChannelName (61-63)
  • getRealtimeChannel (39-55)
live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt (1)
  • assertWaiter (11-20)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (1)
lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (1)
  • LiveMapUpdate (14-66)
💤 Files with no reviewable changes (1)
  • live-objects/src/test/kotlin/io/ably/lib/objects/unit/ObjectMessageSizeTest.kt
🧰 Additional context used
🧠 Learnings (25)
📓 Common learnings
Learnt from: sacOO7
PR: ably/ably-java#1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.
Learnt from: sacOO7
PR: ably/ably-java#1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:48-61
Timestamp: 2025-06-03T09:15:18.827Z
Learning: User sacOO7 prefers simple test utilities without extensive error handling, believing tests should fail fast if incorrect field/method names are used rather than having defensive programming.
lib/src/main/java/io/ably/lib/objects/LiveObjects.java (7)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/Utils.kt (7)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livecounter/LiveCounterManagerTest.kt (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMap.java (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounter.java (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (1)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

lib/src/main/java/io/ably/lib/objects/type/LiveObjectUpdate.java (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/DefaultLiveObjects.kt (8)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsManager.kt (5)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterChange.java (2)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt:87-89
Timestamp: 2025-06-06T09:28:12.298Z
Learning: The Sandbox.kt file in ably-java live-objects module already has comprehensive HTTP retry mechanism using HttpRequestRetry with 5 retries, exponential backoff, and automatic retry on non-success responses and timeout exceptions.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveCounterTest.kt (3)

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-10-08T15:37:26.765Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-09-25T09:08:30.472Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMapChange.java (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (4)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveObjectsTest.kt (6)

Learnt from: sacOO7
PR: #1095
File: live-objects/src/test/kotlin/io/ably/lib/objects/unit/LiveObjectTest.kt:1-6
Timestamp: 2025-06-05T10:24:28.789Z
Learning: In Kotlin, functions, classes, and other declarations within the same package are automatically accessible without explicit import statements. Do not suggest adding imports for functions/classes that are already in the same package.

Learnt from: sacOO7
PR: #1087
File: live-objects/src/main/kotlin/io/ably/lib/objects/ObjectMessage.kt:198-198
Timestamp: 2025-05-27T12:12:10.782Z
Learning: In Kotlin/Java codebases, when referencing types (classes, enums, interfaces) that are defined in the same package, no import statement is required as they are automatically accessible due to package-private visibility.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-10-08T15:37:26.765Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

Learnt from: ttypic
PR: #1034
File: java/build.gradle.kts:55-55
Timestamp: 2024-09-25T09:08:30.472Z
Learning: In Kotlin DSL, the beforeTest method requires a Groovy closure and cannot be replaced with a lambda expression.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt (6)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:38-46
Timestamp: 2025-06-23T14:14:17.847Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class uses intentional unsafe casting (objects as Array<ObjectMessage>) without type validation in both writeMsgpackArray and asJsonArray methods. This is a deliberate design decision to keep the dynamically-loaded class simple and let ClassCastException occur naturally for type mismatches.

Learnt from: sacOO7
PR: #1087
File: lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java:32-34
Timestamp: 2025-05-27T12:11:25.084Z
Learning: In LiveObjects implementation (lib/src/main/java/io/ably/lib/objects/LiveObjectsAdapter.java), the send method intentionally hardcodes queueEvents to true rather than respecting ably.options.queueMessages. This is because LiveObjects requires reliable message delivery to ensure proper state synchronization and acknowledgment, unlike other realtime components that may allow configurable queuing behavior.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1)

Learnt from: sacOO7
PR: #1085
File: lib/src/main/java/io/ably/lib/objects/LiveObjects.java:0-0
Timestamp: 2025-05-20T13:12:19.013Z
Learning: The LiveObjects interface does not currently include public API methods for resource management (dispose) or change listeners, as these features are not yet implemented.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (3)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:21-32
Timestamp: 2025-06-03T09:15:15.338Z
Learning: In test utility code for the Ably Java Live Objects module, the team prefers to keep reflection-based field access utilities simple without additional error handling, allowing tests to fail fast if incorrect field names are used.

Learnt from: sacOO7
PR: #1092
File: live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt:48-61
Timestamp: 2025-06-03T09:15:18.827Z
Learning: User sacOO7 prefers simple test utilities without extensive error handling, believing tests should fail fast if incorrect field/method names are used rather than having defensive programming.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (2)

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/Serialization.kt:25-29
Timestamp: 2025-06-23T14:18:25.315Z
Learning: In the ably-java codebase, the DefaultLiveObjectSerializer class methods like writeMsgpackArray will have their type signatures updated to be non-nullable since the calling sites ensure objects are never null when passed to these methods.

Learnt from: sacOO7
PR: #1106
File: live-objects/src/main/kotlin/io/ably/lib/objects/serialization/MsgpackSerialization.kt:207-211
Timestamp: 2025-06-23T14:28:23.301Z
Learning: In the Ably Java LiveObjects MessagePack deserialization code, the action field in ObjectOperation is guaranteed to always be present in the protocol, so using a default value during deserialization is acceptable and won't mask real protocol errors.

🧬 Code Graph Analysis (9)
lib/src/main/java/io/ably/lib/objects/LiveObjects.java (1)
live-objects/src/main/kotlin/io/ably/lib/objects/ObjectId.kt (1)
  • type (5-62)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt (1)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (2)
  • createMap (22-26)
  • createCounter (57-61)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt (1)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (2)
  • setMapRef (40-43)
  • createMap (22-26)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1)
lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (1)
  • LiveMapUpdate (14-66)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt (1)
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (1)
  • LiveCounterUpdate (13-80)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveMapTest.kt (2)
live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (2)
  • generateChannelName (61-63)
  • getRealtimeChannel (39-55)
live-objects/src/test/kotlin/io/ably/lib/objects/TestUtils.kt (1)
  • assertWaiter (11-20)
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (1)
lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (1)
  • LiveMapUpdate (14-66)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (11)
  • GitHub Check: check-realtime
  • GitHub Check: check-liveobjects
  • GitHub Check: check-realtime-okhttp
  • GitHub Check: check-rest-okhttp
  • GitHub Check: check-rest
  • GitHub Check: build
  • GitHub Check: check (24)
  • GitHub Check: check (19)
  • GitHub Check: check
  • GitHub Check: check (29)
  • GitHub Check: check (21)
🔇 Additional comments (65)
lib/src/main/java/io/ably/lib/objects/LiveObjects.java (1)

4-5: LGTM! Import updates correctly reflect package restructuring.

The imports have been properly updated to reference LiveCounter and LiveMap from their new sub-packages, aligning with the modular restructuring where these interfaces were moved to more specific packages and enhanced with subscription capabilities.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveObjectsTest.kt (1)

12-13: LGTM! Test imports updated for relocated interfaces.

The import statements have been correctly updated to reference LiveCounter and LiveMap from their new sub-packages, ensuring the integration tests continue to work with the restructured package hierarchy.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/Utils.kt (1)

4-5: LGTM! Helper utility imports updated consistently.

The import statements have been updated to match the new package structure, maintaining consistency across the test infrastructure.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/setup/IntegrationTest.kt (1)

25-25: LGTM! Timeout increase accommodates new subscription functionality.

The timeout extension from 10 to 15 seconds is reasonable given the introduction of subscription-based update notifications, coordinators, and typed update processing that require additional asynchronous handling time.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMap.java (2)

1-1: LGTM! Package relocation improves modular organization.

The LiveMap interface has been appropriately moved to the more specific io.ably.lib.objects.type.map package, improving the modular structure of the codebase.


17-17: LGTM! Subscription capability enhancement through interface extension.

The LiveMap interface now extends LiveMapChange, integrating it into the new subscription-based update notification system while maintaining all existing functionality. This design allows for backward compatibility while adding real-time update subscription capabilities.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livecounter/LiveCounterManagerTest.kt (1)

31-31: LGTM! Test updates align with typed update structure.

The changes correctly reflect the refactoring from generic map-based updates (update["amount"]) to typed update objects (update.update.amount). This aligns with the new LiveCounterUpdate structure that extends LiveObjectUpdate with a nested update field containing the amount.

Also applies to: 61-61

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounter.java (1)

1-1: LGTM! Package reorganization and subscription interface extension.

The changes correctly:

  1. Move LiveCounter to the more specific io.ably.lib.objects.type.counter package
  2. Extend LiveCounterChange to provide subscription capabilities for counter updates

This aligns with the broader refactoring to implement object subscriptions and improve package organization.

Also applies to: 14-14

live-objects/src/main/kotlin/io/ably/lib/objects/DefaultLiveObjects.kt (2)

5-6: LGTM! Import updates for package reorganization.

The imports correctly reflect the new package locations for LiveCounter and LiveMap interfaces after their move to type-specific packages.


124-124: LGTM! Code style improvements.

Minor improvements including indentation fix and comment enhancement with specification reference.

Also applies to: 176-176

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/RestObjects.kt (1)

8-8: LGTM! Test fixture centralization improvement.

The changes improve test modularity by:

  1. Adding DataFixtures import
  2. Using DataFixtures.mapRef(refMapObjectId) instead of directly creating ObjectData

This centralizes fixture creation and improves code reuse across integration tests.

Also applies to: 41-41

lib/src/main/java/io/ably/lib/objects/type/LiveObjectUpdate.java (1)

1-24: LGTM! Well-designed base class for typed updates.

The LiveObjectUpdate abstract class provides a solid foundation for the typed update system:

  • Good abstraction: Abstract class allows common structure while requiring subclass specialization
  • Flexible design: Nullable update field handles both meaningful updates and no-op scenarios
  • Proper encapsulation: Protected constructor and field are appropriate for inheritance hierarchy
  • Clear documentation: Comprehensive Javadoc explains purpose and usage

This design enables the transition from generic map-based updates to strongly-typed update objects across LiveCounter and LiveMap implementations.

live-objects/src/main/kotlin/io/ably/lib/objects/ObjectsManager.kt (5)

4-4: LGTM - Import addition supports type safety improvements.

The import of LiveObjectUpdate aligns with the broader refactoring to strongly typed update handling.


129-130: LGTM - Type refinement improves type safety.

The change from MutableList<Pair<BaseLiveObject, Any>> to MutableList<Pair<BaseLiveObject, LiveObjectUpdate>> provides better type safety and aligns with the new strongly typed update mechanism.


4-4: LGTM: Import added for type refinement.

The import of LiveObjectUpdate is necessary to support the type refinement in the existingObjectUpdates list.


129-130: LGTM: Improved type safety with LiveObjectUpdate.

The type refinement from MutableList<Pair<BaseLiveObject, Any>> to MutableList<Pair<BaseLiveObject, LiveObjectUpdate>> provides better type safety and aligns with the broader refactoring to use strongly typed update objects instead of generic maps. This ensures compile-time type checking and improves code maintainability.


153-156: LGTM: Comments updated to reflect typed approach.

The comment update correctly reflects the new implementation that uses typed LiveObjectUpdate objects for subscription callbacks, maintaining clarity about the purpose of this code section.

live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt (5)

6-6: LGTM - Import supports typed update testing.

The import of LiveMapUpdate enables testing of the new strongly typed update mechanism.


641-641: LGTM - Test assertions correctly updated for typed updates.

The test assertions have been properly updated to work with the new LiveMapUpdate structure:

  • Accessing .update property to get the map of changes
  • Using enum constants LiveMapUpdate.Change.UPDATED and LiveMapUpdate.Change.REMOVED instead of string literals
  • This provides better type safety and aligns with the refactored calculateUpdateFromDataDiff method

Also applies to: 653-653, 665-665, 683-683, 701-701, 719-719, 737-737, 749-749, 778-782, 800-800, 818-818


6-6: LGTM: Import added for LiveMapUpdate.

The import is necessary to support the updated test assertions that expect LiveMapUpdate.Change enum values.


641-641: LGTM: Test assertions updated for typed update mechanism.

The test assertions have been correctly updated to expect LiveMapUpdate.Change enum values (UPDATED, REMOVED) instead of string literals. The .update property access properly retrieves the change map from the LiveMapUpdate object. This aligns with the broader refactoring to use strongly typed update objects and provides better compile-time type checking.

Also applies to: 653-653, 665-665, 683-683, 701-701, 719-719, 737-737, 749-749, 778-782


800-800: LGTM: Remaining test cases updated consistently.

The final test cases for objectId changes and same data scenarios are correctly updated to use the new typed approach with LiveMapUpdate.Change.UPDATED and access to the .update property.

Also applies to: 818-818

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/CounterFixtures.kt (4)

45-45: LGTM - Function extraction improves modularity.

Replacing the inline map creation with a call to createUserEngagementMatrixMap improves code organization and reusability.


59-88: LGTM - Well-documented extracted function.

The new createUserEngagementMatrixMap function is well-implemented with:

  • Comprehensive KDoc documentation describing the structure and purpose
  • Clear ASCII art diagram showing the object hierarchy
  • Preserved functionality from the original inline implementation
  • Consistent naming and structure with similar functions in the codebase

45-45: LGTM: Refactored to use dedicated function.

The extraction of the engagement metrics map creation into a separate function improves modularity and code organization while maintaining the same functionality.


59-88: LGTM: Well-documented helper function added.

The new createUserEngagementMatrixMap function is excellently documented with a clear KDoc comment that includes the object structure visualization. The function properly encapsulates the creation of engagement metrics counters and returns the map object ID as expected. This refactoring improves code modularity and makes the engagement metrics creation reusable.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt (4)

137-139: LGTM - Function extraction with separate reference setup.

The refactoring separates user profile map creation from reference setup, improving modularity while maintaining the same functionality through explicit setMapRef calls.


151-184: LGTM - Well-documented extracted function.

The new createUserProfileMapObject function is well-implemented with:

  • Comprehensive KDoc documentation with ASCII diagram
  • Clear separation of basic user fields from nested references
  • Consistent structure and naming patterns
  • Proper focus on primitive data types as documented

137-139: LGTM: Refactored to separate concerns.

The refactoring properly separates the creation of the basic user profile map from setting up references to other maps. This improves code modularity while maintaining the same functionality.


151-184: LGTM: Well-structured helper function with excellent documentation.

The new createUserProfileMapObject function is well-designed with comprehensive KDoc documentation that clearly describes its purpose and structure. The function focuses on creating only the basic user information fields with primitive values, leaving reference setup to the calling code. This separation of concerns improves modularity and makes the user profile creation reusable across different test scenarios.

lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterChange.java (2)

1-52: LGTM - Well-designed subscription interface.

The LiveCounterChange interface is excellently implemented with:

  • Clear API design: Three focused methods for subscription management (subscribe, unsubscribe, unsubscribeAll)
  • Proper annotations: @NonBlocking and @NotNull annotations correctly applied
  • Comprehensive documentation: JavaDoc clearly explains behavior, threading context, and usage patterns
  • Flexible architecture: Supports multiple independent listeners per LiveCounter instance
  • Consistent design: Follows the same pattern as the broader live objects subscription mechanism
  • Thread safety awareness: Documents that callbacks execute on real-time processing thread

The nested Listener interface with the onUpdated callback provides a clean contract for receiving LiveCounterUpdate events.


1-53: LGTM: Well-designed subscription interface.

This is an excellently designed interface for LiveCounter subscriptions with several strengths:

  • Clean API: Provides intuitive methods for subscription management (subscribe, unsubscribe, unsubscribeAll)
  • Multi-listener support: Allows multiple independent listeners per LiveCounter instance
  • Proper annotations: Uses @NonBlocking and @NotNull annotations appropriately for performance and nullability
  • Comprehensive documentation: Clear JavaDoc with detailed descriptions of behavior and usage
  • Performance awareness: Includes important warning about callback execution speed for real-time processing
  • Good structure: Nested Listener interface keeps related functionality together

The interface follows modern reactive patterns and provides a solid foundation for the subscription mechanism in the LiveObjects framework.

lib/src/main/java/io/ably/lib/objects/type/map/LiveMapUpdate.java (4)

19-21: LGTM - Clear no-op constructor implementation.

The no-op constructor correctly passes null to the parent class to represent no changes, which aligns with the toString() method's null check.


28-30: LGTM - Constructor properly validates non-null updates.

The @NotNull annotation ensures the update parameter cannot be null, and the super constructor call properly passes the typed map to the parent class.


60-65: LGTM - Well-designed enum with clear semantics.

The Change enum clearly distinguishes between UPDATED (for additions/modifications) and REMOVED operations, with helpful documentation explaining the semantics.


37-40: Type safety verified for LiveMapUpdate.getUpdate

  • LiveObjectUpdate.update is only assigned via the protected constructor.
  • LiveMapUpdate’s two constructors accept either null or @NotNull Map<String, Change>, so update is guaranteed to be of the correct type when non-null.
  • No other subclasses or code paths store a different type in update for LiveMapUpdate.

The unchecked cast can remain as-is.

live-objects/src/test/kotlin/io/ably/lib/objects/integration/DefaultLiveCounterTest.kt (4)

3-4: LGTM - Package imports updated for new structure.

The imports correctly reference the new package locations for LiveCounter and LiveMap after the refactoring.


224-228: LGTM - Clear subscription setup and update collection.

The subscription pattern is well-structured, using a mutable list to collect update amounts and accessing the update data through the proper API (update.update.amount).


231-239: LGTM - Comprehensive first increment test.

The test properly:

  • Performs the increment operation
  • Waits for async update using assertWaiter
  • Verifies both the update notification and final counter value
  • Uses clear assertions with descriptive messages

266-276: LGTM - Proper unsubscription verification.

The test correctly verifies that:

  • Updates are cleared before unsubscription
  • No updates are received after unsubscribing
  • The counter value still updates but notifications stop
  • Uses assertTrue(counterUpdates.isEmpty()) for final verification
lib/src/main/java/io/ably/lib/objects/type/map/LiveMapChange.java (3)

14-22: LGTM - Well-designed subscription method.

The subscribe method has a clear signature with proper annotations:

  • @NonBlocking indicates it won't block the calling thread
  • @NotNull ensures both parameter and return value are non-null
  • Returns ObjectsSubscription for proper lifecycle management
  • Supports multiple independent listeners as documented

44-51: LGTM - Clear listener callback design.

The onUpdated callback method is well-designed:

  • Takes a strongly-typed LiveMapUpdate parameter
  • Documentation warns about execution speed (important for real-time processing)
  • Clear parameter documentation about the update contents

7-11: LGTM - Comprehensive interface documentation.

The class-level documentation clearly explains:

  • The purpose (real-time updates on LiveMap)
  • What events are covered (add, update, remove)
  • Conflict resolution strategy (last-write-wins)
  • Integration with LiveMap objects
lib/src/main/java/io/ably/lib/objects/type/counter/LiveCounterUpdate.java (2)

27-29: LGTM - Constructor properly wraps amount in Update object.

The constructor correctly creates an Update instance to wrap the amount, maintaining consistency with the parent class design that expects an object parameter.


36-39: Approve unchecked cast in getUpdate() as safe

The update field in LiveObjectUpdate is only ever set in each subclass’s constructor to either an instance of the correct type (new Update(amount) or a Map<String,Change>) or null for no-ops. At runtime the cast in getUpdate() will always succeed when non-null, so no further changes are needed.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt (4)

9-15: LGTM - Import changes align with new package structure.

The new imports correctly reference:

  • LiveObjectUpdate base class
  • Moved LiveMap and LiveMapChange interfaces
  • New LiveMapUpdate class
  • noOp extension for update checking

113-119: LGTM - Clean delegation pattern for subscription management.

The subscription methods properly delegate to liveMapManager, maintaining separation of concerns:

  • subscribe returns the subscription for lifecycle management
  • unsubscribe and unsubscribeAll delegate appropriately
  • Consistent with the manager pattern used throughout the class

121-123: LGTM - Return type change improves type safety.

Changing from Map<String, String> to LiveMapUpdate provides better type safety and aligns with the new typed update system introduced across the codebase.


134-140: LGTM - Well-implemented update notification with logging.

The notifyUpdated method properly:

  • Checks for no-op updates to avoid unnecessary processing
  • Logs updates for debugging (using appropriate log level)
  • Casts and delegates to the manager for notification
  • Follows the established logging pattern with object ID
live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapChangeCoordinator.kt (1)

23-38: LGTM! Well-structured subscription coordination.

The implementation properly encapsulates subscription management with a clean API. The use of ObjectsSubscription with a lambda for unsubscribing is an elegant pattern that prevents memory leaks.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterChangeCoordinator.kt (1)

1-50: Good consistency with LiveMapChangeCoordinator.

The implementation maintains excellent consistency with the map coordinator, which helps with maintainability and understanding of the codebase.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/LiveCounterManager.kt (1)

11-116: Excellent refactoring to typed updates.

The migration from generic maps to LiveCounterUpdate objects improves type safety and makes the code more maintainable. The implementation correctly handles all counter operations and edge cases.

live-objects/src/main/kotlin/io/ably/lib/objects/type/BaseLiveObject.kt (2)

17-17: LGTM! Elegant no-op detection.

The extension property provides a clean way to check for no-op updates across all LiveObjectUpdate subclasses.


181-187: Well-designed abstract method for update notification.

The new notifyUpdated abstract method provides a clean contract for subclasses to implement their specific update notification logic while maintaining type safety.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt (5)

7-15: LGTM! Well-organized imports for the subscription feature.

The new imports properly support the typed update model and subscription interfaces introduced in this PR.


64-71: Clean delegation pattern for subscription management.

The subscription methods properly delegate to liveCounterManager, maintaining separation of concerns and following the interface contract.


74-76: Good improvement with typed return value.

The change from generic return type to LiveCounterUpdate improves type safety and API clarity.


82-84: Correct implementation of clearData with proper update notification.

The method properly captures the cleared value in the update before resetting, enabling accurate change notifications.


86-92: Type cast in notifyUpdated is safe by design
The unchecked cast (update as LiveCounterUpdate) is guaranteed safe because notifyUpdated is only ever invoked by LiveCounterManager.applyOperation, which always supplies a LiveCounterUpdate instance. This mirrors the pattern in DefaultLiveMap and is an intentional design choice. No changes required.

live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/LiveMapManager.kt (6)

10-14: Proper integration with the new subscription architecture.

The class correctly extends LiveMapChangeCoordinator and imports the required typed update classes.


23-23: Consistent typed return value.

The return type change to LiveMapUpdate aligns with the new typed update model.


75-76: Correct update notification implementation.

The addition of notifyUpdated call ensures subscribers are properly notified of changes after operations are applied.


91-91: Good use of predefined no-op constant.

Replacing empty map returns with noOpMapUpdate improves code clarity and potentially reduces object allocations.

Also applies to: 115-115, 168-168, 214-214


148-148: Excellent use of enum constants for type safety.

Replacing string literals with LiveMapUpdate.Change enum values prevents typos and improves maintainability.

Also applies to: 188-188


248-300: Well-executed refactoring to typed updates.

The method correctly maintains the original diff logic while adopting the new LiveMapUpdate type and enum constants throughout.

- Fixed integration tests for LiveMapManager based on returned result
@sacOO7 sacOO7 force-pushed the feature/object-subscriptions branch from 1847ba8 to f0b6493 Compare July 23, 2025 12:12
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 23, 2025 12:12 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 23, 2025 12:14 Inactive
@sacOO7 sacOO7 requested a review from ttypic July 23, 2025 12:19
- Added missing throwIfInvalidAccessApiConfiguration during subscribe
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 24, 2025 10:11 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 24, 2025 10:13 Inactive
Copy link
Contributor

@ttypic ttypic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I would delete unsubscribeAll as we discussed, but we can do it later

@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 29, 2025 10:46 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 29, 2025 10:47 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features July 29, 2025 15:30 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc July 29, 2025 15:33 Inactive
@sacOO7 sacOO7 force-pushed the feature/objects-getroot branch from 67cfb14 to 2ddd598 Compare August 1, 2025 10:03
# Conflicts:
#	lib/src/main/java/io/ably/lib/objects/LiveObjects.java
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/livecounter/DefaultLiveCounter.kt
#	live-objects/src/main/kotlin/io/ably/lib/objects/type/livemap/DefaultLiveMap.kt
#	live-objects/src/test/kotlin/io/ably/lib/objects/integration/helpers/fixtures/MapFixtures.kt
#	live-objects/src/test/kotlin/io/ably/lib/objects/unit/type/livemap/LiveMapManagerTest.kt
@github-actions github-actions bot temporarily deployed to staging/pull/1130/features August 1, 2025 10:24 Inactive
@github-actions github-actions bot temporarily deployed to staging/pull/1130/javadoc August 1, 2025 10:25 Inactive
@sacOO7
Copy link
Collaborator Author

sacOO7 commented Aug 6, 2025

closing in favor of #1139

@sacOO7 sacOO7 closed this Aug 6, 2025
@ttypic ttypic deleted the feature/object-subscriptions branch September 28, 2025 21:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants